From: Kenichi Handa Date: Wed, 10 Jun 2009 01:26:15 +0000 (+0000) Subject: (font_parse_family_registry): Fix for one-char foundry. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~445 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=76cfaa30b14c6b1ab26ca96138d13013a6b23a19;p=emacs.git (font_parse_family_registry): Fix for one-char foundry. (font_sort_entities): Initialize prefer_prop[FONT_AVGWIDTH_INDEX]. --- diff --git a/src/font.c b/src/font.c index 5adec3e1193..bc21fce3859 100644 --- a/src/font.c +++ b/src/font.c @@ -1844,7 +1844,7 @@ font_parse_family_registry (family, registry, font_spec) p1 = index (p0, '-'); if (p1) { - if ((*p0 != '*' || p1 - p0 > 1) + if ((*p0 != '*' && p1 - p0 > 0) && NILP (AREF (font_spec, FONT_FOUNDRY_INDEX))) Ffont_put (font_spec, QCfoundry, font_intern_prop (p0, p1 - p0, 1)); p1++; @@ -2326,7 +2326,7 @@ font_sort_entities (vec, prefer, frame, best_only) USE_SAFE_ALLOCA; len = ASIZE (vec); - for (i = FONT_WEIGHT_INDEX; i <= FONT_DPI_INDEX; i++) + for (i = FONT_WEIGHT_INDEX; i <= FONT_AVGWIDTH_INDEX; i++) prefer_prop[i] = AREF (prefer, i); if (FLOATP (prefer_prop[FONT_SIZE_INDEX])) prefer_prop[FONT_SIZE_INDEX]